import java.util.Scanner;

// HJ13 句子逆序
public class HJ13 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String str = sc.nextLine();
            String[] arr = str.split(" ");
            if (arr.length > 0) {
                for (int i = arr.length; i > 0; i--) {
                    System.out.printf(arr[i-1] + " ");
                }
            }
        }
    }
}
